﻿using DAL.DataAccessObject;
using DAL.DataTransferObject;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace BAL
{
    public class NhaPhanPhoiBAO
    {
        public static NhaPhanPhoiDAO nppDAO = new NhaPhanPhoiDAO();
        public void NPP_AddNew(NhaPhanPhoi npp)
        {
            nppDAO.NPP_AddNew(npp);
        }
        public void NPP_Update(NhaPhanPhoi npp)
        {
            nppDAO.NPP_Update(npp);
        }
        public void NPP_Delete(NhaPhanPhoi npp)
        {
            npp.NgayKetThucHD = npp.NgayBatDauHD;
            nppDAO.NPP_Update(npp);
        }
        public List<NhaPhanPhoi> NPP_SearchName(string a)
        {
            return nppDAO.NPP_SearchName(a);
        }
        public bool NPP_CheckName(string a)
        {
            return nppDAO.NPP_CheckName(a);
        }
        public List<NhaPhanPhoi> NPP_GetData()
        {
            return nppDAO.NPP_GetData();
        }

        public DataView SelectViewAllNPP()
        {
            return nppDAO.SelectViewAllNPP();
        }
    }
}
